<?php
class Smarty_Diycity extends Smarty {
  function Smarty_Diycity()
  {
    //    $this->Smarty();
    //   $this->template_dir = '/Users/hunjunbag/www/smarty/templates/';
    //    $this->compile_dir = '/Users/hunjunbag/www/smarty/templates_c/';
    //    $this->config_dir = '/Users/hunjunbag/www/smarty/configs/';
    //    $this->cache_dir = '/Users/hunjunbag/www/smarty/cache/';
    $this->template_dir = ROOT_DIR . 'smarty/templates/';
    $this->compile_dir = ROOT_DIR . 'smarty/templates_c/';
    $this->config_dir = ROOT_DIR . 'smarty/configs/';
    $this->cache_dir = ROOT_DIR . 'smarty/cache/';
    $this->caching = false;

    $this->register_modifier('link', 'http_link');
    $this->register_modifier('unescape', 'unescape');
    $this->register_modifier('esc', 'esc');
    $this->register_modifier('shorten_title', 'shorten_title');

    $this->assign('app_name', 'DIYCity.kr');
    if (isset($_SESSION['admin'])) 
      $this->assign('admin', $_SESSION['admin'] == true ? true : false);
  }
}
?>
